<fieldset id="sf_fieldset_[?php echo preg_replace('/[^a-z0-9_]/', '_', strtolower($fieldset)) ?]">
    <div class="ui-widget-header ui-form-legend ui-corner-top-5">
        [?php if ($form->getObject()->isNew()): ?]
            <p class="ui-icon-16 ui-icon-link-add"></p>
        [?php endif; ?]
        [?php if (!$form->getObject()->isNew()): ?]
            <p class="ui-icon-16 ui-icon-link-edit"></p>
        [?php endif; ?]
        <legend class="ui-widget-title">
            [?php if ($form->getObject()->isNew()): ?]
                [?php echo __('Neue ') ?]
            [?php endif; ?]
            [?php if ('NONE' != $fieldset): ?]
                [?php echo __($fieldset, array(), '<?php echo $this->getI18nCatalogue() ?>') ?]
            [?php endif; ?]
        </legend>
    </div>
    <div class="ui-widget-content ui-fieldset-content">
        [?php foreach ($fields as $name => $field): ?]
            [?php if ((isset($form[$name]) && $form[$name]->isHidden()) || (!isset($form[$name]) && $field->isReal())) continue ?]
            [?php include_partial('<?php echo $this->getModuleName() ?>/form_field', array(
              'name'       => $name,
              'attributes' => $field->getConfig('attributes', array()),
              'label'      => $field->getConfig('label'),
              'help'       => $field->getConfig('help'),
              'form'       => $form,
              'field'      => $field,
              'class'      => 'sf_admin_form_row sf_admin_'.strtolower($field->getType()).' sf_admin_form_field_'.$name,
            )) ?]
        [?php endforeach; ?]
          [?php include_partial('<?php echo $this->getModuleName() ?>/flashes') ?]
            [?php if ($sf_user->hasFlash('error')): ?]
                <div class="ui-form-field ui-form-response">
                    <label class="ui-label ui-label-error">[?php echo __('Server Antwort') ?]</label>
                    <p class="ui-form-error ui-state-error ui-corner-all">[?php echo __($sf_user->getFlash('error'), array(), 'sf_admin') ?]</p>
                </div>
            [?php endif; ?]
            [?php if ($sf_user->hasFlash('notice')): ?]
                <div class="ui-form-field ui-form-response">
                    <label class="ui-label">[?php echo __('Server Antwort') ?]</label>
                    <p class="ui-form-notice ui-state-highlight ui-corner-all">[?php echo __($sf_user->getFlash('notice'), array(), 'sf_admin') ?]</p>
                </div>
            [?php endif; ?]
    </div>
    
    <div class="ui-widget-header ui-form-footer ui-corner-bottom-5">
        [?php include_partial('<?php echo $this->getModuleName() ?>/form_actions', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>, 'form' => $form, 'configuration' => $configuration, 'helper' => $helper)) ?]
    </div>
</fieldset>
